<?php
/**
 * Class XPhoto is object-reflection of table photo in database
 * @author SQLObject2
 * @package SQLObject2
 */
class XPhoto extends SQLObject {

    /**
     * Get id
     * @return int
     */
    public function getId() { return $this->getField('id');}

    /**
     * Set id
     * @param int $id
     */
    public function setId($id) {$this->setField('id', $id);}

    /**
     * Get image
     * @return string
     */
    public function getImage() { return $this->getField('image');}

    /**
     * Set image
     * @param string $image
     */
    public function setImage($image) {$this->setField('image', $image);}

    /**
     * Get name
     * @return string
     */
    public function getName() { return $this->getField('name');}

    /**
     * Set name
     * @param string $name
     */
    public function setName($name) {$this->setField('name', $name);}

    /**
     * Get cdate
     * @return string
     */
    public function getCdate() { return $this->getField('cdate');}

    /**
     * Set cdate
     * @param string $cdate
     */
    public function setCdate($cdate) {$this->setField('cdate', $cdate);}

    /**
     * Get photoalbumid
     * @return int
     */
    public function getPhotoalbumid() { return $this->getField('photoalbumid');}

    /**
     * Set photoalbumid
     * @param int $photoalbumid
     */
    public function setPhotoalbumid($photoalbumid) {$this->setField('photoalbumid', $photoalbumid);}

    /**
     * Get description
     * @return string
     */
    public function getDescription() { return $this->getField('description');}

    /**
     * Set description
     * @param string $description
     */
    public function setDescription($description) {$this->setField('description', $description);}

    /**
     * Get hidden
     * @return int
     */
    public function getHidden() { return $this->getField('hidden');}

    /**
     * Set hidden
     * @param int $hidden
     */
    public function setHidden($hidden) {$this->setField('hidden', $hidden);}

    /**
     * Create an object
     * @param int $id
     */
    public function __construct($id = 0) {
        $this->setTablename('photo');
        $this->setFields(array('id', 'image', 'name', 'cdate', 'photoalbumid', 'description', 'hidden'));
        $this->setClassname(__CLASS__);
        $this->setPrimaryKey('id');
        parent::__construct($id);
    }

    /**
     * @return XPhoto
     */
    public function getNext($exception = false) {return parent::getNext($exception); }

    /**
     * @return XPhoto
     */
    public static function Get($key) {return self::GetObject("XPhoto", $key);}

}
